// miniprogram/pages/welcome/welcome.js
var app = getApp()
Page({

  data: {

  },

  onLoad: function (options) {
       qq.showShareMenu({
      showShareItems: ['qq', 'qzone', 'wechatFriends', 'wechatMoment']
    })
  },

  getUserInfo: function (e) {
    console.log(e)
    var userInfo = e.detail.userInfo
    if(userInfo){
      app.globalData.userInfo=userInfo
      qq.switchTab({
        url:"../tabBar1/tabBar1"
      })
      setTimeout(function(){
        qq.showModal({
          title:'便捷提示',
          content:"将小精灵添加到桌面更容易打开哦",
          showCancel:false,
          confirmText:"好的",
          success(res){
            qq.saveAppToDesktop()
          }
        })      
      },5000)
    }
  },
})